-
Notifications
You must be signed in to change notification settings - Fork 34
Add --use-pr-number to changelog add command #2422
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
lcawl
wants to merge
6
commits into
main
Choose a base branch
from
changelog-pr-filenames
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
🔍 Preview links for changed docs |
… combined' Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
cotti
approved these changes
Jan 14, 2026
reakaleek
approved these changes
Jan 14, 2026
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background
The
docs-builder changelog addcommand currently outputs files that follow the naming structure using by Elastic Agent: https://github.com/elastic/elastic-agent/tree/main/changelog/fragmentsHowever, Elasticsearch changelogs currently use a different format (i.e. the filenames match the PR numbers): https://github.com/elastic/elasticsearch/tree/main/docs/changelog
It seems reasonable for the tool to accommodate either option.
Summary
--use-pr-numberoption to thedocs-builder changelog addcommand.Changes Made
ChangelogInput.cs: AddedUsePrNumberproperty to track when the option is enabled.ChangelogCommand.cs:--use-pr-numberparameter (boolean, defaults to false)ChangelogInputChangelogService.cs:--pris provided when--use-pr-numberis usedExtractPrNumber()helper to extract PR numbers from:https://github.com/owner/repo/pull/123owner/repo#123123(when--ownerand--repoare provided){prNumber}.yamlwhen--use-pr-numberis set, instead of{timestamp}-{slug}.yamldocs/contribute/changelog.md:--use-pr-numberto the command options list{timestamp}-{sanitized-title}.yaml) and how to use--use-pr-numberto create filenames like{pr-number}.yamldocs/cli/release/changelog-add.md:--use-pr-numberoption documentation in the Options section--prmust be provided when using this optionUsage
This command creates a file named
767653383-esql-fix-extent-reading-when-missing.yaml:This command creates a file named
140034.yaml:Here are more examples:
The implementation includes validation and error handling. The build completed successfully, and the help output shows the new option.
Generative AI disclosure
Tool(s) and model(s) used: composer-1 agent